package com.mew.common.dc.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.mew.common.entity.user.Friend;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mew.common.rest.user.SimpleUserBO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 好友 Mapper 接口
 * </p>
 *
 * @author Dylin
 * @since 2021-04-06
 */
@DS("mew_core")
public interface FriendMapper extends BaseMapper<Friend> {
    /**
     *获取好申请列表
     * @param uid
     * @return
     */
    List<SimpleUserBO> getFriendApplys(@Param("uid") long uid);
    /**
     *获取好友列表
     * @param uid
     * @return
     */
    List<SimpleUserBO> getFriends(@Param("uid") long uid);
    /**
     *获取好友合集
     * @param uid
     * @return
     */
    List<Long> getNotGiveFriends(@Param("uid") long uid);
    /**
     * 推荐好友
     * 随机取 {limit} 非好友个用户
     * @param uid
     * @param limit
     * @return
     */
    List<SimpleUserBO> getRandomUser(@Param("uid") long uid,@Param("limit")int limit);
}
